<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%namespace YouHP.Model%>
<%namespace YouHP.BLL%>
<%namespace YouHP.Utility%>
<%template _Header%>
<script type="text/javascript" src="/support/common/common.js"></script>
<script type="text/javascript" src="/support/alpha/Js/mootools.js"></script>
<link rel="stylesheet" href="/support/common/jquery-ui.css" type="text/css" />
<script type="text/javascript"" src="/support/common/jquery.js"></script>
<script type="text/javascript"" src="/support/common/ui.core.js"></script>
<script type="text/javascript"" src="/support/common/ui.datepicker.js"></script>
<script type="text/javascript"" src="/support/common/ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/support/common/ui.draggable.js"></script> 
<script type="text/javascript" src="/support/swfobject/open-flash-chart.js"></script>
<style>
     ._INDICATOR_TEXT_ { margin: 5px;}
    .symchartcontent {WIDTH: 850px;  TEXT-ALIGN: center; margin:0 auto;}
    .symchartleft { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 60px; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center;}
    .symchartright { MARGIN: 0px; BACKGROUND-COLOR: #cccccc; TEXT-ALIGN: center; width:780px;}
    ._indicator_text_ {MARGIN: 5px;height:25px}
</style>

<div class="layout2-cols2">

<%csharp%>TempUrl = ModuleCtrl.Header4("baseinfo","我的基本资料",true,false); <%/csharp%>
{TempUrl}
  
        <script type="text/javascript" src="/support/swfobject/swfobject.js"></script>
        <script type="text/javascript" src="/support/swfobject/swfhelper.js"></script>
<div  class="baseinfo">
<table border="0" cellpadding="0" cellspacing="0"  class="patient_table">
<tr>
<td style=" border-right:1px solid #E1E4E6;width:400px;">

<table class="patient_image">

<tr><td>
<div>
   <img src="{ProfileData.Avatar}" alt="头像"/>
</div>
</td>
<td>
<%csharp%>TempUrl = "/Disease.aspx?id=" + PrData.DiseaseId; <%/csharp%>
<li><h5>{ProfileData.UserName}<%if PrData.DiseaseId>0%>(<a target="_blank" href="{GetUrl(TempUrl)}"><b>{DiseaseBLL.Instance.GetDiseaseInfo(PrData.DiseaseId).Name}</b></a>)

<%csharp%>TempUrl = "/DiseaseHistory/index.aspx";<%/csharp%>
<a href="{GetUrl(TempUrl)}"><font style="font-size:12px;color:#808080;">修改</font></a><%/if%></h5></li>
<li><span>性别：</span>{ProfileData.Gender}</li>
<li><span>年龄：</span><%if ProfileData.Age>206%>未知<%else%>{ProfileData.Age}<%/if%></li>

	        <%csharp%>
				string province=ProfileData.Province;
				string city=ProfileData.City;
		  <%/csharp%>
			
<li><span>地区：</span>	
               <%if province!=""||city!=""%>
				{province}&nbsp;{city}
				<%else%>未知<%/if%></li>
</td>

</tr></table>

</td>

<td style=" border-right:1px solid #E1E4E6;width:250px;" valign="top">

 <%if PrData.DiseaseId>0%>
<li><span>发病时间：</span>{StartDateStr}</li>
<li><span>确诊时间：</span>{ConfirmDateStr}</li>
<li><span>确诊医院：</span><%if PrData.ConfirmHospital!=""%>{PrData.ConfirmHospital}<%else%>未知<%/if%></li>
<%/if%>
<!--<li><span>电子邮箱：</span>{ProfileData.Email}</li>
<li><span>QQ：</span><%if ProfileData.QQ!=""%>{ProfileData.QQ}<%else%>未知<%/if%></li>
<li><span>MSN：</span><%if ProfileData.MSN!=""%>{ProfileData.MSN}<%else%>未知<%/if%></li>-->
</td>

<td valign="top" width="250px">

<span>个人简介：</span><br />
<%if ProfileData.Description!=""%>
{ProfileData.Description}<%else%>暂无
<%/if%>
</td>

</tr>
<tr><td>
<span>历史访问量：</span><em>{ProfileData.ViewCount}</em>&nbsp;&nbsp;<span>更新次数：</span><em>{PrData.UpdateTime}</em>&nbsp;&nbsp;<span>最近更新：</span><em>{PrData.UpdateDate.ToString("yyyy-MM-dd")}</em>
<td>&nbsp;</td>
<%csharp%>
    TempUrl = "/User/BasicInfo.aspx";
    string sNowDate=DateTime.Today.ToString("d");
<%/csharp%>
<td><a href="{GetUrl(TempUrl)}"><font style="color:Green; text-decoration:underline; font-size:14px;">编辑我的资料</font></a></td>
</td>
</tr>
</table>
</div>
 <%csharp%>TempUrl = ModuleCtrl.Footer("baseinfo"); <%/csharp%>
 {TempUrl}

         
<%if PrData.DiseaseId<=0%>
    <%csharp%>TempUrl = "/DiseaseHistory/Index.aspx"; <%/csharp%>
    <h2 style="padding:10px; text-align:center;">你还没有记录你的患病信息，<a href="{this.GetUrl(TempUrl)}" style="color:Green;">现在开始记录</a></h2>
   
<%else%>   

<%if PrData.DiseaseId==20%>
<%csharp%>TempUrl = ModuleCtrl.Header4("XiaoChuangraph","哮喘的控制程度",true,false); <%/csharp%>
{TempUrl}
  <table><tr>
  <td width="100px" align="center" valign="top" style="padding-top:20px">
        <%csharp%>TempUrl = "/XiaoChuanHistory/Index.aspx"; <%/csharp%>
        <a href ="{this.GetUrl(TempUrl)}" class="selectall">更新</a>
</td><td>
        <div id="Div1" style="text-align:center;">
            <div id="xiaochuanchart1"></div>
            <script type="text/javascript" src="/support/swfobject/xiaochuan.js"></script>                                                 
                <script type="text/javascript">
                    var g_uid = getURLParam("uid");
                    var g_sXiaoChuanUrl = "/Pages/Alpha/XiaoChuanHistory/XiaoChuanHistory.aspx?uin=" + g_uid;
                    var g_vXiaoChuanFlash = "xiaochuanchart";
                    swfobject.embedSWF("/support/swfchart/open-flash-chart.swf", "xiaochuanchart1", "850", "250", "9.0.0", "expressInstall.swf", { 'id': '1', 'flashready': 'OnXiaoChuanFlashReady' }, { wmode: "transparent" });
            </script>
        </div>
        
        <div class="time_tab">
         <span>按时间分段查看：</span>
            <table cellpadding="0" cellspacing="0" border="0"><tr>
                <td id="k_time_tab_1"><a href="javascript:showXiaoChuanFlashMode(1);changeRangeClass('t_time_tab_',1,5,1,'tab_over','');">三月</a></td>
                <td id="k_time_tab_2"><a href="javascript:showXiaoChuanFlashMode(2);changeRangeClass('t_time_tab_',1,5,2,'tab_over','');">六月</a></td>
                <td id="k_time_tab_3"><a href="javascript:showXiaoChuanFlashMode(3);changeRangeClass('t_time_tab_',1,5,3,'tab_over','');">一年</a></td>
                <td id="k_time_tab_4"><a href="javascript:showXiaoChuanFlashMode(4);changeRangeClass('t_time_tab_',1,5,4,'tab_over','');">三年</a></td>
                <td id="k_time_tab_5"><a href="javascript:showXiaoChuanFlashMode(0);changeRangeClass('t_time_tab_',1,5,5,'tab_over','');">所有</a></td>
                <td>
                 从
            <input class="box-var validate-date" id="dateXiaoChuanStart" maxlength="10" size="10" name="dateXiaoChuanStart" style="vertical-align:top;"
                value="2009-01-01" />
            到
            <input class="box-var validate-date" id="dateXiaoChuanEnd" maxlength="10" size="10" name="dateXiaoChuanEnd" style="vertical-align:top;"
                 value="{sNowDate}" />
                <input type=button id="Button4" value="查看"/ onclick="javascript:showXiaoChuanFlashMode(5,parseDate(_$('dateXiaoChuanEnd').value),parseDate(_$('dateXiaoChuanStart').value));"></td>
          </tr></table>
        </div>   
 </td></tr></table>           
 <%csharp%>TempUrl = ModuleCtrl.Footer("XiaoChuangraph"); <%/csharp%>
 {TempUrl}
<%/if%> 

<%csharp%>TempUrl = ModuleCtrl.Header4("Indicatorgraph","指标图表",true,false); <%/csharp%>
{TempUrl}

  <table><tr>
  <td width="100px" align="center" valign="top" style="padding-top:20px">
  <%csharp%>TempUrl = "/IndicatorHistory/Index.aspx"; <%/csharp%>
      <a href ="{this.GetUrl(TempUrl)}" class="selectall">更新</a>
</td><td>
                <div id=indicatorchart>
            <div id="indicatorchart1"></div>
            <script type="text/javascript" src="/support/swfobject/indicatorhistory.js"></script>                                                 
                <script type="text/javascript">
                var g_uid=getURLParam("uid");
                var g_sUrl="/Pages/Alpha/IndicatorHistory/IndicatorHistory.aspx?uin="+g_uid;
                var g_chartwidth=850;
                var g_vIndicatorFlash="indicatorchart";
                swfobject.embedSWF("/support/swfchart/open-flash-chart.swf", "indicatorchart1", g_chartwidth, "250","9.0.0", "expressInstall.swf",{'id':'1','flashready':'OnIndicatorFlashReady'},{wmode: "transparent"});
            </script>
        <br /><div id="indicatorchart2"></div>
        <br /><div id="indicatorchart3"></div>
        </div>
                
         <div class="time_tab">
         <span>按时间分段查看：</span>
          <table cellpadding="0" cellspacing="0" border="0">
          <tr>
            <td id="i_time_tab_1"><a href="javascript:showIndicatorFlashMode(1);changeRangeClass('i_time_tab_',1,5,1,'tab_over','');">三月</a></td>
            
            <td id="i_time_tab_2"><a href="javascript:showIndicatorFlashMode(2);changeRangeClass('i_time_tab_',1,5,2,'tab_over','');">六月</a></td>
           
            <td id="i_time_tab_3"><a href="javascript:showIndicatorFlashMode(3);changeRangeClass('i_time_tab_',1,5,3,'tab_over','');">一年</a></td>
            
            <td id="i_time_tab_4"><a href="javascript:showIndicatorFlashMode(4);changeRangeClass('i_time_tab_',1,5,4,'tab_over','');">三年</a></td>
           
            <td id="i_time_tab_5"><a href="javascript:showIndicatorFlashMode(0);changeRangeClass('i_time_tab_',1,5,5,'tab_over','');">所有</a></td>
            <td>
             从
            <input class="box-var validate-date" id="dateIndicatorStart" maxlength="10" size="10" name="dateIndicatorStart" style="vertical-align:top;" value="2009-01-01" />
            到 
            <input class="box-var validate-date" id="dateIndicatorEnd" maxlength="10" size="10" name="dateIndicatorEnd" style="vertical-align:top;" value="{sNowDate}" />
            <input type=button id="btnShowIndicatorData" value="查看"/ onclick="javascript:showIndicatorFlashMode(5,parseDate(_$('dateIndicatorEnd').value),parseDate(_$('dateIndicatorStart').value));"></li>
           </td>
           </tr>
          </table>
        </div>    
 </td></tr></table>       
  <%csharp%>TempUrl = ModuleCtrl.Footer("Indicatorgraph"); <%/csharp%>
 {TempUrl}
 
        
 <%csharp%>TempUrl = ModuleCtrl.Header4("symptomgraph"," 症状图表",true,false); <%/csharp%>
{TempUrl}
  <table><tr>
  <td width="100px" align="center" valign="top" style="padding-top:20px">
        <%csharp%>TempUrl = "/SymptomHistory/Index.aspx"; <%/csharp%>
        <a href ="{this.GetUrl(TempUrl)}" class="selectall">更新</a>
</td><td>
               
    <div id="symptomdiv"  style="text-align:center;margin:0 auto">            
        <div id="symptomchart1"></div>
            <script type="text/javascript" src="/support/swfobject/symptom.js"></script>                                                 
                <script type="text/javascript">
                var g_uid=getURLParam("uid");
                var g_sSymptomUrl="/Pages/Alpha/SymptomHistory/SymptomHistory.aspx?uin="+g_uid;
                var g_vSymptomFlash="symptomchart";
                swfobject.embedSWF("/support/swfchart/open-flash-chart.swf", "symptomchart1", "850", "250","9.0.0", "expressInstall.swf",{'id':'1','flashready':'OnSymptomFlashReady'},{wmode: "transparent"});
            </script>
     </div>
   
    <div class="time_tab">
    <span>按时间分段查看：</span>
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td id="s_time_tab_1"><a href="javascript:showSymptomFlashMode(1);changeRangeClass('s_time_tab_',1,5,1,'tab_over','');">三月</a></td>
            <td id="s_time_tab_2"><a href="javascript:showSymptomFlashMode(2);changeRangeClass('s_time_tab_',1,5,2,'tab_over','');">六月</a></td>
            <td id="s_time_tab_3"><a href="javascript:showSymptomFlashMode(3);changeRangeClass('s_time_tab_',1,5,3,'tab_over','');">一年</a></td>
            <td id="s_time_tab_4"><a href="javascript:showSymptomFlashMode(4);changeRangeClass('s_time_tab_',1,5,4,'tab_over','');">三年</a></td>
            <td id="s_time_tab_5"><a href="javascript:showSymptomFlashMode(0);changeRangeClass('s_time_tab_',1,5,5,'tab_over','');">所有</a></td>
        
            <td> 从
                <input class="box-var validate-date" id="dateSymptomStart" maxlength="10" size="10" name="dateSymptomStart" style="vertical-align:top;"
                    value="2009-01-01" />
                到
                <input class="box-var validate-date" id="dateSymptomEnd" maxlength="10" size="10" name="dateSymptomEnd" style="vertical-align:top;"
                    value="{sNowDate}" />
             <input type=button id="Button1" value="查看"/ onclick="javascript:showIndicatorFlashMode(5,parseDate(_$('dateSymptomEnd').value),parseDate(_$('dateSymptomStart').value));">
          </td>
        </tr>
      </table>
     </div>
     </td></tr></table>
 <%csharp%>TempUrl = ModuleCtrl.Footer("symptomgraph"); <%/csharp%>
 {TempUrl}
 

        
 <%csharp%>TempUrl = ModuleCtrl.Header4("treatmentgraph","治疗图表",true,false); <%/csharp%>
{TempUrl}
  <table><tr>
  <td width="100px" align="center" valign="top" style="padding-top:20px">

        <%csharp%>TempUrl = "/TreatmentHistory/Index.aspx"; <%/csharp%>
        <a href ="{this.GetUrl(TempUrl)}" class="selectall">更新</a>
 
</td><td>            
    <div class="treatmentdiv" style="text-align:center;margin:0 auto">
                <div id="Treatmentchart1"></div>
                <script type="text/javascript">
                    var uin=getURLParam("uid");
                    var g_sTreatmentUrl="/Pages/Alpha/TreatmentHistory/TreatmentHistory.aspx?uin="+uin;
                    swfobject.embedSWF("/support/swfchart/open-flash-chart.swf", "Treatmentchart1", "850", "250","9.0.0", "expressInstall.swf",{'id':'1','flashready':'OnTreatmentFlashReady'},{wmode: "transparent"});
                </script>
                <script type="text/javascript" src="/support/swfobject/Treatment.js"></script>
            </div>
   
    <div class="time_tab">
    <span>按时间分段查看：</span>
         <table cellpadding="0" cellspacing="0" border="0"><tr>
          <td id="t_time_tab_1"><a href="javascript:showTreatmentFlashMode(1);changeRangeClass('t_time_tab_',1,5,1,'tab_over','');">三月</a></td>

            <td id="t_time_tab_2"><a href="javascript:showTreatmentFlashMode(2);changeRangeClass('t_time_tab_',1,5,2,'tab_over','');">六月</a></td>
           
            <td id="t_time_tab_3"><a href="javascript:showTreatmentFlashMode(3);changeRangeClass('t_time_tab_',1,5,3,'tab_over','');">一年</a></td>
            
            <td id="t_time_tab_4"><a href="javascript:showTreatmentFlashMode(4);changeRangeClass('t_time_tab_',1,5,4,'tab_over','');">三年</a></td>
           
            <td id="t_time_tab_5"><a href="javascript:showTreatmentFlashMode(0);changeRangeClass('t_time_tab_',1,5,5,'tab_over','');">所有</a></td>
            <td>从
            <input class="box-var validate-date" id="dateTreatmentStart" maxlength="10" size="10" name="dateTreatmentStart" style="vertical-align:top;"
                value="2009-01-01" />
            到
            <input class="box-var validate-date" id="dateTreatmentEnd" maxlength="10" size="10" name="dateTreatmentEnd" style="vertical-align:top;"
                 value="{sNowDate}" />
            <input type=button id="Button3" value="查看"/ onclick="javascript:showTreatmentFlashMode(5,parseDate(_$('dateTreatmentEnd').value),parseDate(_$('dateTreatmentStart').value));"></td>
    </tr></table>
    </div>  
 </td></tr></table>    
 <%csharp%>TempUrl = ModuleCtrl.Footer("treatmentgraph"); <%/csharp%>
 {TempUrl}
 
  <%csharp%>TempUrl = ModuleCtrl.Header4("Weightgraph","体重图表",true,false); <%/csharp%>
{TempUrl}
  <table><tr>
  <td width="100px" align="center" valign="top" style="padding-top:20px">
        <%csharp%>TempUrl = "/WeightHistory/Index.aspx"; <%/csharp%>
        <a href ="{this.GetUrl(TempUrl)}" class="selectall">更新</a>
</td><td>
        <div id="generaldiv" style="text-align:center;">
            <div id="weightchart1"></div>
            <script type="text/javascript" src="/support/swfobject/weight.js"></script>                                                 
                <script type="text/javascript">
                var g_uid=getURLParam("uid");
                var g_sWeightUrl="/Pages/Alpha/WeightHistory/WeightHistory.aspx?uin="+g_uid;
                var g_vWeightFlash="weightchart";
                swfobject.embedSWF("/support/swfchart/open-flash-chart.swf", "weightchart1", "850", "250","9.0.0", "expressInstall.swf",{'id':'1','flashready':'OnWeightFlashReady'},{wmode: "transparent"});
            </script>
        </div>
        
        <div class="time_tab">
         <span>按时间分段查看：</span>
            <table cellpadding="0" cellspacing="0" border="0"><tr>
                <td id="w_time_tab_1"><a href="javascript:showWeightFlashMode(1);changeRangeClass('t_time_tab_',1,5,1,'tab_over','');">三月</a></td>
                <td id="w_time_tab_2"><a href="javascript:showWeightFlashMode(2);changeRangeClass('t_time_tab_',1,5,2,'tab_over','');">六月</a></td>
                <td id="w_time_tab_3"><a href="javascript:showWeightFlashMode(3);changeRangeClass('t_time_tab_',1,5,3,'tab_over','');">一年</a></td>
                <td id="w_time_tab_4"><a href="javascript:showWeightFlashMode(4);changeRangeClass('t_time_tab_',1,5,4,'tab_over','');">三年</a></td>
                <td id="w_time_tab_5"><a href="javascript:showWeightFlashMode(0);changeRangeClass('t_time_tab_',1,5,5,'tab_over','');">所有</a></td>
                <td>
                 从
            <input class="box-var validate-date" id="dateWeightStart" maxlength="10" size="10" name="dateWeightStart" style="vertical-align:top;"
                value="2009-01-01" />
            到
            <input class="box-var validate-date" id="dateWeightEnd" maxlength="10" size="10" name="dateWeightEnd" style="vertical-align:top;"
                 value="{sNowDate}" />
            <input type=button id="Button2" value="查看"/ onclick="javascript:showWeightFlashMode(5,parseDate(_$('dateWeightEnd').value),parseDate(_$('dateWeightStart').value));"></td>
          </tr></table>
        </div>   
 </td></tr></table>           
 <%csharp%>TempUrl = ModuleCtrl.Footer("Weightgraph"); <%/csharp%>
 {TempUrl}
 
 <%/if%> 

        
 <%csharp%>TempUrl = ModuleCtrl.Header4("commentpost","发表留言",false,false); <%/csharp%>
{TempUrl}
 
            <div class="content" style="text-align:center;">
             
            <%csharp%>if(UserData.Id > 0) { <%/csharp%>
            <div style=" margin:0 auto;">
                    <form id="feedback" name="feedback" method="post" action="">
                    <div id="plshow">
                    <div class="bor"> 
                    <textarea name="msg" cols="120" rows="6" id="msg" class="rev_textarea"></textarea>
                    <br /><font color="#808080">(字数请不要超过300个字)</font>
                    </div>
                 <div style=" padding-right:50px;"> <div style="float:right;"  onmouseout="this.className='new_bt'" onmouseover="this.className='new_bt_h'" onclick="CommentAdd({ProfileData.Id});" class="new_bt">马上发表</div></div>
                  
                    </div>
                    </form>    
            </div>
            <%csharp%> } else { <%/csharp%>
            <%csharp%>TempUrl = "/User/Login.aspx"; <%/csharp%>
            <b>我要说两句</b>.... (请在<a href="{this.GetUrl(TempUrl)}"><b style="text-decoration:underline; color:Red;">登录</b></a>后发表意见)
            <%csharp%> } <%/csharp%>
         
             </div>
 <%csharp%>TempUrl = ModuleCtrl.Footer("commentpost"); <%/csharp%>
 {TempUrl}
        

        
        <div class="box">
        <a name="pagefocus"></a>       
        <div class="pl"id="commentList">
   
                <div style="padding:20px 50px;">
                <%csharp%> TempUrl = "/images/indicator_medium.gif";<%/csharp%>
                <img src="{this.GetResource(TempUrl)}" /><b>正在加载评论……</b>

                </div>
        </div>     
        </div>

        <a name="cmt"></a>
<script type="text/javascript">
function loadComments ()
{
//  var query = location.href.substring(location.href.indexOf("?")); 
  var uid=getURLParam("uid", location.href);
  var aurl = "/Pages/alpha/Ajax/CommentListAjax.aspx?uid="+uid+"&page=1";
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("commentList").innerHTML=html;
      }
   }
   );
   myAjax.request();
}  

function ViewCommentPage(pageindex)
{
  var query = location.href.substring(location.href.indexOf("?"));
  var aurl = "/Pages/alpha/Ajax/CommentListAjax.aspx"+query+"&page="+pageindex;
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("commentList").innerHTML=html;
      }
   }
   );
   myAjax.request();
} 


 
function CommentDelete(id)
{
  var query = location.href.substring(location.href.indexOf("?"));
  var aurl = "/Pages/alpha/Ajax/CommentDeleteAjax.aspx"+query+"&id="+id;
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("commentList").innerHTML=html;
      }
   }
   );
   myAjax.request();
  
  
} 


function CommentAdd(toUserId)
{
    var query = location.href.substring(location.href.indexOf("?"));
    var msg = _$("msg").value;
  
    if (msg.length == 0)
    {
        alert("评论内容不能为空！");
        return;
    }
    if(msg.length > 300 ) 
    {
        alert("评论内容不能超过300个字！");
        return;
    }
  var query = location.href.substring(location.href.indexOf("?"));
  var aurl = "/Pages/alpha/Ajax/CommentAddAjax.aspx"+query+"&msg="+msg.escUrl()+"&toUserId="+toUserId;
  var myAjax=new Ajax(aurl,
  {
     method:'post',
     onComplete:function()
     {
              var html=this.response.text;
              _$("commentList").innerHTML=html;
              _$("msg").value="";
      }
   }
   );
   myAjax.request();
  
  
}


function CommentReplyAdd(id,parentId,toUserId)
{
    var query = location.href.substring(location.href.indexOf("?"));
    var replycontent = _$("replycontent"+id).value;
      
        if (replycontent.length == 0)
        {
            alert("回复内容不能为空！");
            return;
        }
        if(replycontent.length > 300 ) 
        {
            alert("回复内容不能超过300个字！");
            return;
        }
      
      var aurl = "/Pages/alpha/Ajax/CommentReplyAddAjax.aspx"+query+"&replycontent="+replycontent.escUrl()+"&toUserId="+toUserId+"&parentId="+parentId;
      var myAjax=new Ajax(aurl,
      {
         method:'get',
         onComplete:function()
         {
           var html=this.response.text;
           _$("commentList").innerHTML=html;
           _$('replycontent'+id).value = "";
           _$('replybox'+id).style.display = 'none';
          }
       }
       );
       myAjax.request();
}

function replyadd(id)
{

      _$('replybox'+id).style.display = 'block';
}
function replycancell(id)
{

      _$('replybox'+id).style.display = 'none';
}

function displayReplyList(id)
{ 

      var e = _$('commentReplyList_'+id).style.display;
      if(e == 'none')
      {
        _$('commentReplyList_'+id).style.display = 'block';
        _$('displaySwitch_'+id).innerHTML = '-收缩';
      }
      else
      {
        _$('commentReplyList_'+id).style.display = 'none';
        _$('displaySwitch_'+id).innerHTML = '+展开';
      }
}

function changeRangeClass(prefix, start,end, inew, newclass, oldclass)
{
    for(var i=start;i<=end;++i) _$(prefix+i).className = i==inew ? newclass : oldclass ;
}
loadComments();
</script>
</div>
<script type="text/javascript" src="/support/Alpha/Js/profile/index.js"></script>
<%template _footer%>		
